<?php

declare(strict_types=1);

namespace App\Model;


/**
 * @property int $userid 管理员ID
 * @property int $roleid 角色ID
 * @property string $username 用户名
 * @property string $nickname 昵称
 * @property string $password 密码
 * @property string $salt 密钥
 * @property int $op_userid 操作用户ID（创建者）
 * @property string $op_username 
 * @property int $op_time 
 * @property string $last_ip 最后登录IP
 * @property int $last_time 最后登录时间
 * @property string $status 
 */
class Admin extends Model
{
    /**
     * The table associated with the model.
     */
    protected ?string $table = 'admin';

    /**
     * The attributes that are mass assignable.
     */
    protected array $fillable = ['userid', 'roleid', 'username', 'nickname', 'password', 'salt', 'op_userid', 'op_username', 'op_time', 'last_ip', 'last_time', 'status'];

    /**
     * The attributes that should be cast to native types.
     */
    protected array $casts = ['userid' => 'integer', 'roleid' => 'integer', 'op_userid' => 'integer', 'op_time' => 'integer', 'last_time' => 'integer'];

    protected array $hidden = ['password', 'salt'];
}
